package com.cn.goodsadmin.dao.impl;

import com.cn.goodsadmin.dao.BaseDao;
import com.cn.goodsadmin.dao.ILogisticsDao;
import com.cn.goodsadmin.po.Logistics;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("LogisticsDaoImpl")
public class LogisticsDaoImpl extends BaseDao<Logistics> implements ILogisticsDao {
    public Logistics findLogisticsByLid(String logid) throws Exception {
        StringBuilder builder=new StringBuilder();
        builder.append("from Logistics l where l.cLogisticsid='"+logid+"'");
        List<Logistics> logistics=find(builder.toString());
        if(logistics!=null&&logistics.size()>0){
            return  logistics.get(0);
        }
        return null;
    }
}
